\textit{Source: KACTL} \\

Pre-submit:

\begin{itemize}
\item Write a few simple test cases, if sample is not enough.
\item Are time limits close? If so, generate max cases.
\item Is the memory usage fine?
\item Could anything overflow?
\item Make sure to submit the right file.
\end{itemize}

Wrong answer:
\begin{itemize}
\item Print your solution! Print debug output, as well.
\item Are you clearing all datastructures between test cases?
\item Can your algorithm handle the whole range of input?
\item Read the full problem statement again.
\item Do you handle all corner cases correctly?
\item Have you understood the problem correctly?
\item Any uninitialized variables?
\item Any overflows?
\item Confusing N and M, i and j, etc.?
\item Are you sure your algorithm works?
\item What special cases have you not thought of?
\item Are you sure the STL functions you use work as you think?
\item Add some assertions, maybe resubmit.
\item Create some testcases to run your algorithm on.
\item Go through the algorithm for a simple case.
\item Go through this list again.
\item Explain your algorithm to a team mate.
\item Ask the team mate to look at your code.
\item Go for a small walk, e.g. to the toilet.
\item Is your output format correct? (including whitespace)
\item Rewrite your solution from the start or let a team mate do it.
\end{itemize}

Runtime error:
\begin{itemize}
\item Have you tested all corner cases locally?
\item Any uninitialized variables?
\item Are you reading or writing outside the range of any vector?
\item Any assertions that might fail?
\item Any possible division by 0? (mod 0 for example)
\item Any possible infinite recursion?
\item Invalidated pointers or iterators?
\item Are you using too much memory?
\item Debug with resubmits (e.g. remapped signals, see Various).
\end{itemize}

Time limit exceeded:
\begin{itemize}
\item Do you have any possible infinite loops?
\item What is the complexity of your algorithm?
\item Are you copying a lot of unnecessary data? (References)
\item How big is the input and output? (consider scanf)
\item Avoid vector, map. (use arrays/unordered map)
\item What do your team mates think about your algorithm?
\end{itemize}

Memory limit exceeded:
\begin{itemize}
\item What is the max amount of memory your algorithm should need?
\item Are you clearing all data structures between test cases?
\end{itemize}
